# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libxpm
pkgver=3.5.13
pkgrel=2
pkgdesc="X11 pixmap library"
arch=('x86_64')
license=('custom')
url="https://xorg.freedesktop.org/"
depends=('libxt' 'libxext')
makedepends=('xorg-util-macros')
source=(${url}/releases/individual/lib/libXpm-${pkgver}.tar.bz2{,.sig})
sha512sums=('3b8f6e926272f39b1d95135c2274c00f5aaee1f9fb2ef79f71628df5edeb7ba20158819ef6a778101cc4092493a3b5b613c53634fdccadcc0fc85f0605e5e9a5'
            'SKIP')
validpgpkeys=('C41C985FDCF1E5364576638B687393EE37D128F8') # Matthieu Herrb <matthieu.herrb@laas.fr>
validpgpkeys+=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # "Peter Hutterer (Who-T) <office@who-t.net>"

build() {
  cd libXpm-${pkgver}
  ./configure --prefix=/usr --sysconfdir=/etc --disable-static
  make
}

check() {
  cd libXpm-${pkgver}
  make check
}

package() {
  cd libXpm-${pkgver}
  make DESTDIR="${pkgdir}" install

  install -m755 -d "${pkgdir}"/usr/share/licenses/${pkgname}
  install -m644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/
}
